home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 241 / 241.d81 / bb edit (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  5KB  |  149 lines

  1. 10 rem copyright 1988 compute! publications, inc. - all rights reserved
  2. 11 print"[147]":poke53272,20
  3. 20 ifa=0thena=1:load"bb barrage",8,1
  4. 30 poke51,0:poke52,32:poke55,0:poke56,32:clr:poke53281,15:poke53280,15
  5. 40 print"[147]   copyright 1988 compute! pub., inc."
  6. 50 printtab(11)"all rights reserved":fori=1to1500:next
  7. 60 dimc%(255),c2(24),x(15),y(15)
  8. 70 fori=4to16:readc2(i):next
  9. 80 data1,1,1,1,1,1,3,4,5,6,7,8,9
  10. 90 fori=0to63:poke960+i,0:next
  11. 100 fori=0to23step3:reada:poke960+i,a:next
  12. 110 data255,129,129,129,129,129,129,255
  13. 120 fori=0to5:reada:h(i)=a:c%(a+128)=1:next:c%(32)=1
  14. 130 data32,81,64,93,77,78
  15. 140 fori=48to53:c%(i)=2:next
  16. 150 x(5)=1:x(6)=1:x(7)=1:x(9)=-1:x(10)=-1:x(11)=-1
  17. 160 y(10)=-1:y(14)=-1:y(6)=-1:y(9)=1:y(13)=1:y(5)=1
  18. 170 u$=chr$(145):d$=chr$(17):r$=chr$(29):l$=chr$(157):c$=chr$(147)+d$+d$
  19. 180 c%(145)=-14:c%(17)=-13:c%(29)=-7:c%(157)=-11
  20. 190 h$=chr$(159)+chr$(19)+d$+d$+d$+d$+d$
  21. 200 fori=1to5:reada:c%(a)=1:h$=h$+chr$(a)+d$+l$:next
  22. 210 data209,192,221,205,206
  23. 220 fori=3to10:reada$:c%(asc(a$))=i:h$=h$+a$+d$+l$:next
  24. 230 datap,s,l,c,m,o,h,e
  25. 240 c%(13)=11
  26. 250 x=0:y=4:ch=h(1):us=51957
  27. 260 j=56320:v=53248:pokev+21,1:pokev+39,7:pokev+23,0:pokev+29,0:poke2040,15
  28. 270 gosub560
  29. 280 pokev+1,y*8+50:t=x*8+24:ift>255thenpokev+16,1:goto300
  30. 290 pokev+16,0
  31. 300 pokev,255andt
  32. 310 a=0:t=peek(j):f=16andt:jy=15andt
  33. 320 iff=16then380
  34. 330 ifxthen360
  35. 340 a=c2(y):ifa=1thena$=chr$(h(y-4))
  36. 350 goto430
  37. 360 s=y*40+x+1024:t=ch:ifpeek(s)=chthent=32
  38. 370 pokes,t:ifmfthengosub580
  39. 380 dx=x(jy):dy=y(jy):ifdxordythen530
  40. 390 geta$
  41. 400 a=c%(asc(a$+"@")):ifa=0then310
  42. 405 ifa$=chr$(13)then1330
  43. 410 ifa<0thendx=x(-a):dy=y(-a):goto530
  44. 420 ifa>2thenpoke53269,0
  45. 430 onagoto450,500,650,660,760,820,840,850,1150,1330,1340
  46. 440 goto310
  47. 450 s=x+y*40+1024:ch=asc(a$)-128:t=ch:ift<0thent=t+128:ch=t
  48. 460 ifx=0then310
  49. 470 ifpeek(s)=chthent=32
  50. 480 pokes,t:ifmfthengosub580
  51. 490 goto310
  52. 500 s=x+y*40+1024:ch=h(val(a$)):ifx=0then310
  53. 510 t=ch:pokes,t:ifmfthengosub580
  54. 520 goto310
  55. 530 y=y+dy:x=x+dx:ify<0ory>24theny=y-dy
  56. 540 ifx>38orx<0thenx=x-dx
  57. 550 goto280
  58. 560 poke53281,15:printc$:poke53281,0:printh$:sys49161
  59. 570 poke1584,13+mf*128:poke53269,1:return
  60. 580 x1=39-x:y1=24-y
  61. 590 s1=x1+y1*40+1024:pokes1,t
  62. 600 ift=77thent=78:goto620
  63. 610 ift=78thent=77
  64. 620 s1=x1+y*40+1024:pokes1,t
  65. 630 s1=x+y1*40+1024:pokes1,t
  66. 640 return
  67. 650 sys49155:clr:goto60
  68. 660 sys49158:printc$"save screen to disk"
  69. 670 ea=peek(253)+peek(254)*256+1:sa=us+13
  70. 680 he=int(ea/256):le=ea-he*256:hs=int(sa/256):ls=sa-hs*256
  71. 690 input"enter filename ";f$:iff$=""thenprint"aborted":goto740
  72. 700 open1,8,1,f$:poke193,ls:poke194,hs
  73. 710 poke174,le:poke175,he
  74. 720 sys62957:close1
  75. 730 print"save complete"
  76. 740 fori=1to999:next
  77. 750 gosub560:goto310
  78. 760 printc$"load screen from disk"
  79. 770 input"enter filename ";f$:iff$=""thenprint"aborted":goto810
  80. 780 open1,8,0,f$:poke185,1:poke780,0
  81. 790 sys65493:close1
  82. 800 print"load complete"
  83. 810 gosub560:goto310
  84. 820 poke53281,15:printc$h$:poke53281,0:x=0:y=4:ch=h(1)
  85. 830 poke1584,13+mf*128:goto280
  86. 840 mf=1-mf:poke1584,13+mf*128:goto310
  87. 850 sys49158:printc$" options and colors [146]"
  88. 860 m$="background":t=0:mn=0:mx=15
  89. 870 gosub1110:ba=t
  90. 880 m$="border":t=11:gosub1110:pokeus+7,t
  91. 890 m$="puck color":t=14:gosub1110:pokeus+8,t
  92. 900 m$="bb color":t=15:gosub1110:pokeus+6,t*16+ba
  93. 910 m$="right gun color":t=1:gosub1110:pokeus+9,t*16+ba
  94. 920 m$="left gun color":t=1:gosub1110:pokeus+5,t*16+ba
  95. 930 m$="goals needed to win":t=7:mn=1:gosub1110:pokeus+2,t
  96. 940 print"how many seconds until destruct mode?"
  97. 950 m$="(-1 for no destruct)":t=60:mn=-1:mx=900:gosub1110
  98. 960 ift<0thenpokeus+3,255:goto980
  99. 970 se=t*60:t1=int(se/256):pokeus+3,t1:t2=256-se+t1*256:pokeus+4,t2
  100. 980 m$="friction: 1=on, 0=off":t=1:mn=0:mx=1:gosub1110:pokeus+10,t
  101. 990 print"choose 0 for shared bb's"
  102. 1000 m$="       1 for possessive":t=0:gosub1110:pokeus+12,t
  103. 1010 print"maximum number of bb's in play"
  104. 1020 m$="   ":t=100:mn=10:mx=250:gosub1110:pokeus-1,t+3
  105. 1030 m$="rapid fire delay":mn=1:mx=100:t=7:gosub1110:pokeus+11,t
  106. 1040 print:print"save new version to disk (y/n)?"
  107. 1050 geta$:ifa$="n"then1100
  108. 1060 ifa$<>"y"then1050
  109. 1070 fori=us+13to53248
  110. 1080 ifpeek(i)=255thensa=49152:ea=i+1:i=53248
  111. 1090 next:goto680
  112. 1100 gosub560:goto310
  113. 1110 printm$"   "t;
  114. 1120 fori=0tolen(str$(t))+1:printl$;:next:inputu
  115. 1130 ifu<mnoru>mxthenprintu$;:printm$"("mn"-"mx")   "t;:goto1120
  116. 1140 t=u:return
  117. 1150 sys49158:pokev+21,0:printc$tab(11)" command summary"
  118. 1160 print:print" the first five menu items change the"
  119. 1170 print" deflector type."
  120. 1180 print:print" the letter commands are:"
  121. 1190 print"  p - play with current settings"
  122. 1200 print"  s - save a screen to disk"
  123. 1210 print"  l - load a screen from disk"
  124. 1220 print"  c - clear screen of any barriers"
  125. 1230 print"  m - toggle symmetry mode"
  126. 1240 print"  o - choose options"
  127. 1250 print"  h - show help screen"
  128. 1260 print"  e - exit the program"
  129. 1270 print: print" commands can be invoked by pressing"
  130. 1280 print" that key, or by moving the cursor over"
  131. 1290 print" and pressing the fire button."
  132. 1300 print:print tab(8)" space bar to continue "
  133. 1310 geta$:ifa$<>" "then1310
  134. 1320 goto260
  135. 1330 poke53269,0:printchr$(147):goto40000
  136. 1340 ifx=0thenf=0:goto340
  137. 1350 goto310
  138. 10000 n$="bb edit":open1,8,15,"s0:"+n$:close1:saven$,8:end
  139. 40000 fori=0to21:poke828+i,8+i:next
  140. 40010 ifdv<8ordv>29ordv=8then40030
  141. 40020 a=peek(828):b=peek(828+dv-8):poke828,b:poke828+dv-8,a
  142. 40030 a$="hello connect":forj=8to29:i=peek(828+j-8):ifi=14thennext
  143. 40040 close2:open2,i,2:close2:ifstthen40060
  144. 40050 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then40070
  145. 40060 next:print"[147]":poke53272,23:poke186,8:end
  146. 40070 q$=chr$(34):poke646,peek(53281):print"[147]":poke53272,23
  147. 40080 print"[147]p[207]2048,0:p[207]44,8:p[207]43,1:p[207]56,160:p[207]55,0:clr:l[207]"q$a$q$","i
  148. 40090 print"run:":poke631,13:poke632,13:poke198,2:end
  149.